package top.cardone.data.service.impl;

import org.springframework.transaction.annotation.Transactional;
import top.cardone.data.dao.SimpleDao;
import top.cardone.data.service.SimpleService;

import java.util.List;

/**
 * Created by yao hai tao on 2015/8/24.
 */
@Transactional(readOnly = true)
public class SimpleServiceImpl<Dao extends SimpleDao> extends CrudServiceImpl<Dao> implements SimpleService {
	@Override
	public <P> List<P> findList(Class<P> mappedClass, Object findList) {
		return this.dao.findList(mappedClass, findList);
	}

	@Override
	public <P> P findOne(Class<P> mappedClass, Object findOne) {
		return this.dao.findOne(mappedClass, findOne);
	}

	@Override
	public <R> List<R> readList(Class<R> requiredType, Object readList) {
		return this.dao.readList(requiredType, readList);
	}

	@Override
	public <R> R readOne(Class<R> requiredType, Object readOne) {
		return this.dao.readOne(requiredType, readOne);
	}
}